<template>
  <div class="center">
    <!-- 中间商品内容 -->
    <div class="wrap center-content">
      <!-- 精品推荐 -->
      <div class="fine">
        <!-- 标题 -->
        <div><img src="../assets/img/jingpin.png" alt="" />精品推荐</div>
        <div class="more">
          <span @click="$router.push('/allgift?did=1')">更多</span>
          <img src="../assets/img/arrow.png" alt="" />
        </div>
      </div>
      <!-- 商品内容 -->
      <div class="item-flex">
        <FineItem
          v-for="item in fineList"
          :key="item.id"
          :data="item"
        ></FineItem>
      </div>
    </div>
  </div>
</template>

<script>
import FineItem from "@/components/FineItem.vue";
import { JingpinAPI } from "@/request/api";
export default {
  name: "JifenThreeFine",
  components: {
    FineItem,
  },
  data() {
    return {
      fineList: [],
    };
  },
  // 发送axios请求
  async created() {
    await JingpinAPI().then((res) => {
      // console.log("res1", res);
      this.fineList = res.data.data.records;
      // console.log(this.fineList);
    });
  },
  methods: {},
};
</script>

<style lang="less" scoped>
.center {
  .center-content {
    .fine {
      display: flex;
      justify-content: space-between;
      .more {
        font-size: 18px;
        font-family: SourceHanSansSC;
        font-weight: 300;
        color: #666666;
        display: flex;
        align-items: center;
        span {
          cursor: pointer;
          display: block;
          padding-right: 10px;
        }
        img {
          width: 14px;
          height: 14px;
        }
      }
      div {
        img {
          margin-right: 10px;
        }
        display: flex;
        margin-top: 55px;
        height: 36px;
        line-height: 36px;
        font-size: 30px;
        font-family: SourceHanSansSC;
        font-weight: bold;
        color: #242b39;
      }
    }
    .item-flex {
      padding-top: 20px;
      width: 1500px;
      overflow: hidden;
    }
  }
}
</style>